package com.devops.admin.graphql;

import com.devops.admin.po.DOSProjectVersionReleaseRecordListPo;
import com.devops.admin.service.DOSProjectVersionReleaseRecordService;
import com.devops.admin.vo.DOSProjectVersionReleaseRecordVo;
import com.devops.common.annotation.DOSLog;
import com.netflix.graphql.dgs.DgsComponent;
import com.netflix.graphql.dgs.DgsQuery;
import com.netflix.graphql.dgs.InputArgument;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @ClassName DOSProjectVersionReleaseRecordFetcher
 * @Description TODO
 * @Author heyabo
 * @Date 2022/12/27 10:08
 * @Version 1.0
 **/
@DgsComponent
public class DOSProjectVersionReleaseRecordFetcher {

    @Autowired
    private DOSProjectVersionReleaseRecordService dosProjectVersionReleaseRecordService;

    /**
     * @Author heyabo
     * @Description 查询release的版本记录
     * @Date 11:24 2022/12/27
     * @Param []
     * @return java.util.List<com.devops.admin.po.DOSProjectVersionReleaseRecordListPo>
     **/
    @DgsQuery
    @DOSLog(description = "查询版本流程中release的变化")
    public List<DOSProjectVersionReleaseRecordListPo> getReleaseRecords(@InputArgument DOSProjectVersionReleaseRecordVo releaseRecordVo){

        return dosProjectVersionReleaseRecordService.getReleaseRecords(releaseRecordVo);
    }
}
